<!DOCTYPE html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
  <head>
    <title></title>
    <meta charset="UTF-8">
    <script src="../../../ShadowDOM/shadowdom.js"></script>
    <script src="../../../lib/patches-shadowdom-polyfill.js"></script>
    <script src="../../../lib/template.js"></script>
    <script src="../../../MDV/mdv.js"></script>
  </head>
  <body>
    <x-foo></x-foo>
    <template>
      <template bind="{{}}">
        Hello from {{source}}
      </template>
    </template>
    <script>
      var model = {
        source: 'MDV'
      };
      //
      var wrap = window.ShadowDOMPolyfill ?
        ShadowDOMPolyfill.wrap : function(n){return n;}
      var doc = wrap(document);
      //
      var x = doc.querySelector('x-foo');
      var t = doc.querySelector('template');
      var i = t.createInstance();
      //
      HTMLTemplateElement.bindAllMustachesFrom_(i, model);
      x.appendChild(i);
    </script>
  </body>
</html>
